﻿<Window x:Class="SBattle.GameWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:my="clr-namespace:SBattle.UI"
        xmlns:aero="clr-namespace:Common.AeroGlass;assembly=Common"
        aero:GlassEffect.IsEnabled="True" 
        MouseLeftButtonDown="Window_MouseLeftButtonDown"
        DataContext="{Binding RelativeSource={RelativeSource Self}}"
        Title="SBattle - Game" Height="350" Width="400">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="5" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Grid Grid.Row="0" Grid.Column="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            
            <my:BattleField Grid.Column="0" HorizontalAlignment="Right" x:Name="enemyField" />
            <my:BattleField Grid.Column="1" HorizontalAlignment="Left" x:Name="myField" />
        </Grid>

        <GridSplitter Grid.Row="1" Grid.Column="0" Background="Transparent"
                      ResizeDirection="Rows" ResizeBehavior="PreviousAndNext"
                      VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>

        <my:ChatFrame Grid.Row="2" Grid.Column="0" Client="{Binding Client}" x:Name="chat"  />
    </Grid>
</Window>
